package cn.zhaoyuening.schoolmates.dao.impl;

import org.springframework.stereotype.Repository;

import cn.zhaoyuening.schoolmates.dao.ArticleDao;
import cn.zhaoyuening.schoolmates.domain.Article;
@Repository
public class ArticleDaoImpl extends BaseDaoImpl<Article> implements ArticleDao {

	@Override
	public void updateOrder(Long id, Integer order) {
		if(id==null||order==null){
			return;
		}
		getHibernateTemplate().bulkUpdate("update "+getEntityClass().getSimpleName()+" a set a.order=? where id=?", new Object[]{order,id});
	}
	
}
